<h2><?php echo $this->message; ?></h2>
<?php if(count($this->events)): ?>
	<table>
	<tr>
		<th>Title</th>
		<th>Tournament</th>
		<th>Date add</th>
		<th>Date start</th>
		<th>Date close</th>
		<th>Score home</th>
		<th>Score away</th>
		<th>Result</th>
		<th>Status</th>
		<th>Visible</th>
		<th>CRUD</th>
	</tr>
	<?php foreach($this->events as $event):?>
		<tr>
			<td><?php echo $event->title; ?></td>
			<td><?php echo $event->tourn_id; ?></td>
			<td><?php echo $event->date_add; ?></td>
			<td><?php echo $event->date_start; ?></td>
			<td><?php echo $event->date_close; ?></td>
			<td><?php echo $event->score_left; ?></td>
			<td><?php echo $event->score_right; ?></td>
			<td><?php echo $event->result; ?></td>
			<td><?php echo $event->status; ?></td>
			<td><?php echo $event->visible; ?></td>
			<td>
			<a href="<?php echo $this->url(array('id' => $event->id), 'aevente', true); ?>">Edit</a>
			&nbsp;
			<a href="<?php echo $this->url(array('id' => $event->id), 'aeventd', true); ?>">X</a>		
			</td>
		</tr>
	<?php endforeach;?>
	</table>
<?php else: ?>
	<h1>There are no opened bets</h1>
<?php endif; ?>
<?php 
	if($this->bets instanceof Zend_Paginator){
		echo $this->paginationControl($this->bets, 'Sliding', 'includes/paginationcontrol.phtml'); 
	}
?> 